package com.sicheng.蓝桥.练习题.基础数论.高精度;

import java.util.Scanner;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/5/18 14:46
 */
public class 大数乘法 {
    public static void main(String[] args) {
        String a;
        int b;
        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.nextInt();
        char[] A = new char[a.length()];
        for (int i = a.length() - 1; i >= 0; i--)
            A[a.length() - 1 - i] = a.charAt(i);
        String s = mul(A, b);
        System.out.println(s);
    }

    public static String mul(char[] A, int b) {
        int t = 0;
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < A.length || t != 0; i++) {
            if (i < A.length)
                t += (A[i] - '0') * b;
            sb.append(t % 10);
            t /= 10;
        }
        String s = sb.reverse().toString();
        int i = 0;
        for (; i < A.length - 1; i++) {
            if (s.charAt(i) != '0') break;
        }
        return s.substring(i);
    }

}
